import React from 'react';
import { connect } from 'dva';
import styles from './IndexPage.css';

function IndexPage({ dispatch, example }) {

  function increment() {
    dispatch({
      type: 'example/increment'
    })
  }

  return (
    <div className={styles.normal}>
      <span>{example}</span>
      <div><button onClick={increment}>increment</button></div>
    </div>
  );
}

IndexPage.propTypes = {
};

export default connect(({ example }) => example)(IndexPage);
